<template>
	<div class="margin-top">
		<!-- 计划数据 -->
		<div class="bg-blue-furn padding">
			<lay-json-schema-form :model="formData" :schema="schema" size="sm"></lay-json-schema-form>
		</div>

		<!-- 炉次铸坯计划 -->
		<div class="margin-top" style="clear: both;">
			<pol-title title="炉次铸坯计划"></pol-title>
			<div class="bg-blue-furn" style="height: calc(100vh - 817px); min-height: 300px;">
				<pol-table class="margin-top" ref="polTableRef" v-bind="tableOpt" height="100%">
					<template #caozhuo="{ row, index }">
						<div class="flex align-center justify-center text-green2">
							<span class="cursor">编辑</span>
							<span class="margin-left-lg cursor">删除</span>
						</div>
					</template>
				</pol-table>
			</div>
		</div>
	</div>
</template>

<script setup>
	import { ref } from 'vue';

	//表单数据
	const formData = ref({
		CardTypeCode: '', //
		CardTypeName: '', //
	});

	//表单配置
	const schema = ref({
		CardTypeCode: {
			label: '制作命令号',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		CardTypeName: {
			label: '计划号',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		CardTypeName3: {
			label: '熔炼号',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		CardTypeName4: {
			label: '计划钢种',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		CardTypeName5: {
			label: '冶金路径',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},

		adTypeCode: {
			label: '浇次ID号',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName: {
			label: '炉次数量',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName15: {
			label: '浇次内序号',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},

		adTypeName3: {
			label: '上台重量',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName4: {
			label: '出坯数量',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName5: {
			label: '计划号',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName6: {
			label: '铸坯数量',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName7: {
			label: '罐重量',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName8: {
			label: '到台时刻',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName9: {
			label: '上台时间',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName10: {
			label: '来源',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName11: {
			label: '状态',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName12: {
			label: '到台重量',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName13: {
			label: '罐ID号',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
		adTypeName14: {
			label: '记录人',
			type: 'input',
			props: {
				type: 'text',
				placeholder: '',
			},
			colProps: {
				md: 6,
			},
		},
	});

	const polTableRef = ref(null); //表格ref
	//表格配置
	const columns = ref([
		{ label: '批次序号', key: 'ItemCode', align: 'center', width: '100' },
		{ label: '铸坯数量', key: 'ItemName', align: 'center' },
		{ label: '铸坯类型', key: 'ItemValue', align: 'center' },
		{ label: '铸坯去向', key: 'IsDefault', align: 'center' },
		{ label: '计划断面', key: 'P_IsSys', align: 'center' },
		{ label: '计划切割定尺', key: 'P_IsReadOnly', align: 'center' },
		{ label: '切割定尺上限', key: 'gangbao', align: 'center' },
		{ label: '切割定尺下限', key: 'kaishi', align: 'center' },
		{ label: '操作', key: 'caozhuo', align: 'center', width: '150px', slot: true },
	]);

	//表格配置
	const tableOpt = ref({
		columns: columns.value,
		localData: [{
				ItemCode: '1',
				ItemName: '120',
				ItemValue: '混钢',
				IsDefault: '冷床',
				P_IsSys: '0.53*0.41',
				P_IsReadOnly: '13.2',
				gangbao: '20',
				kaishi: '10',
			},
			{
				ItemCode: '1',
				ItemName: '120',
				ItemValue: '混钢',
				IsDefault: '冷床',
				P_IsSys: '0.53*0.41',
				P_IsReadOnly: '13.2',
				gangbao: '20',
				kaishi: '10',
			},
			{
				ItemCode: '1',
				ItemName: '120',
				ItemValue: '混钢',
				IsDefault: '冷床',
				P_IsSys: '0.53*0.41',
				P_IsReadOnly: '13.2',
				gangbao: '20',
				kaishi: '10',
			},
			{
				ItemCode: '1',
				ItemName: '120',
				ItemValue: '混钢',
				IsDefault: '冷床',
				P_IsSys: '0.53*0.41',
				P_IsReadOnly: '13.2',
				gangbao: '20',
				kaishi: '10',
			},
			{
				ItemCode: '1',
				ItemName: '120',
				ItemValue: '混钢',
				IsDefault: '冷床',
				P_IsSys: '0.53*0.41',
				P_IsReadOnly: '13.2',
				gangbao: '20',
				kaishi: '10',
			},
			{
				ItemCode: '1',
				ItemName: '120',
				ItemValue: '混钢',
				IsDefault: '冷床',
				P_IsSys: '0.53*0.41',
				P_IsReadOnly: '13.2',
				gangbao: '20',
				kaishi: '10',
			},
			{
				ItemCode: '1',
				ItemName: '120',
				ItemValue: '混钢',
				IsDefault: '冷床',
				P_IsSys: '0.53*0.41',
				P_IsReadOnly: '13.2',
				gangbao: '20',
				kaishi: '10',
			},
			{
				ItemCode: '1',
				ItemName: '120',
				ItemValue: '混钢',
				IsDefault: '冷床',
				P_IsSys: '0.53*0.41',
				P_IsReadOnly: '13.2',
				gangbao: '20',
				kaishi: '10',
			},
		]
	});
</script>

<style lang="scss" scoped>

</style>